<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>par_kinematics: /home/wouter/ros_packages/thp-pj2-08/par_kinematics/src/par_kinematics/srv/_coord.py Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>

<table border="0">
<tr><td valign="top" style="border-right: 1px solid #333; padding-right: 10px;" >
<p>
Project: <a href="http://ros.org/wiki/par_kinematics">par_kinematics</a>
</p>
<p>
License: BSD
</p>
<p>
Dependencies: 
<ul>
  <li>std_msgs</li>
  <li>roscpp</li>
  <li>par_trajectory_planning</li>
</ul>
</p>
<p>
Used by:
None<br />
</p>
<p>
<a href="../../index.html">All Packages</a>
</p>

</div>
</td><td valign="top" style="padding-left: 10px;" >
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<h1>/home/wouter/ros_packages/thp-pj2-08/par_kinematics/src/par_kinematics/srv/_coord.py</h1>  </div>
</div>
<div class="contents">
<a href="__coord_8py.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a><a class="code" href="namespacepar__kinematics_1_1srv_1_1__coord.html">00001</a> <span class="stringliteral">&quot;&quot;&quot;autogenerated by genmsg_py from coordRequest.msg. Do not edit.&quot;&quot;&quot;</span>
<a name="l00002"></a>00002 <span class="keyword">import</span> roslib.message
<a name="l00003"></a>00003 <span class="keyword">import</span> struct
<a name="l00004"></a>00004 
<a name="l00005"></a>00005 
<a name="l00006"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html">00006</a> <span class="keyword">class </span><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html">coordRequest</a>(roslib.message.Message):
<a name="l00007"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#aa291af10ca7b4c22c6df00c5684d386e">00007</a>   _md5sum = <span class="stringliteral">&quot;4a842b65f413084dc2b10fb484ea7f17&quot;</span>
<a name="l00008"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#a57c36dffc336a641db7333ea808a39d2">00008</a>   _type = <span class="stringliteral">&quot;par_kinematics/coordRequest&quot;</span>
<a name="l00009"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#aaff0e68932398684b64d138c033d38aa">00009</a>   _has_header = <span class="keyword">False</span> <span class="comment">#flag to mark the presence of a Header object</span>
<a name="l00010"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#ab61edb6d0c60ab574aa0cd3bf3702b1a">00010</a>   _full_text = <span class="stringliteral">&quot;&quot;&quot;float64 x</span>
<a name="l00011"></a>00011 <span class="stringliteral">float64 y</span>
<a name="l00012"></a>00012 <span class="stringliteral">float64 z</span>
<a name="l00013"></a>00013 <span class="stringliteral"></span>
<a name="l00014"></a>00014 <span class="stringliteral">&quot;&quot;&quot;</span>
<a name="l00015"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#a050f46568b2d911cb1c37922eb615848">00015</a>   __slots__ = [<span class="stringliteral">&#39;x&#39;</span>,<span class="stringliteral">&#39;y&#39;</span>,<span class="stringliteral">&#39;z&#39;</span>]
<a name="l00016"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#a7fd622a7267ef4aa761bb5e308e2076e">00016</a>   _slot_types = [<span class="stringliteral">&#39;float64&#39;</span>,<span class="stringliteral">&#39;float64&#39;</span>,<span class="stringliteral">&#39;float64&#39;</span>]
<a name="l00017"></a>00017 
<a name="l00018"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#af7925ffedc76c06cc83a157a89227ec5">00018</a>   <span class="keyword">def </span><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#af7925ffedc76c06cc83a157a89227ec5">__init__</a>(self, *args, **kwds):
<a name="l00019"></a>00019     <span class="stringliteral">&quot;&quot;&quot;</span>
<a name="l00020"></a>00020 <span class="stringliteral">    Constructor. Any message fields that are implicitly/explicitly</span>
<a name="l00021"></a>00021 <span class="stringliteral">    set to None will be assigned a default value. The recommend</span>
<a name="l00022"></a>00022 <span class="stringliteral">    use is keyword arguments as this is more robust to future message</span>
<a name="l00023"></a>00023 <span class="stringliteral">    changes.  You cannot mix in-order arguments and keyword arguments.</span>
<a name="l00024"></a>00024 <span class="stringliteral">    </span>
<a name="l00025"></a>00025 <span class="stringliteral">    The available fields are:</span>
<a name="l00026"></a>00026 <span class="stringliteral">       x,y,z</span>
<a name="l00027"></a>00027 <span class="stringliteral">    </span>
<a name="l00028"></a>00028 <span class="stringliteral">    @param args: complete set of field values, in .msg order</span>
<a name="l00029"></a>00029 <span class="stringliteral">    @param kwds: use keyword arguments corresponding to message field names</span>
<a name="l00030"></a>00030 <span class="stringliteral">    to set specific fields. </span>
<a name="l00031"></a>00031 <span class="stringliteral">    &quot;&quot;&quot;</span>
<a name="l00032"></a>00032     <span class="keywordflow">if</span> args <span class="keywordflow">or</span> kwds:
<a name="l00033"></a>00033       super(coordRequest, self).__init__(*args, **kwds)
<a name="l00034"></a>00034       <span class="comment">#message fields cannot be None, assign default values for those that are</span>
<a name="l00035"></a>00035       <span class="keywordflow">if</span> self.<a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#ad38947dface3e97e904845ec12b83ea3">x</a> <span class="keywordflow">is</span> <span class="keywordtype">None</span>:
<a name="l00036"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#ad38947dface3e97e904845ec12b83ea3">00036</a>         self.<a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#ad38947dface3e97e904845ec12b83ea3">x</a> = 0.
<a name="l00037"></a>00037       <span class="keywordflow">if</span> self.<a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#ad29f561c158c52ff55f9b5d23b0c1de4">y</a> <span class="keywordflow">is</span> <span class="keywordtype">None</span>:
<a name="l00038"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#ad29f561c158c52ff55f9b5d23b0c1de4">00038</a>         self.<a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#ad29f561c158c52ff55f9b5d23b0c1de4">y</a> = 0.
<a name="l00039"></a>00039       <span class="keywordflow">if</span> self.<a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#ac0429ddeeeb8ba454013299360ffe18e">z</a> <span class="keywordflow">is</span> <span class="keywordtype">None</span>:
<a name="l00040"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#ac0429ddeeeb8ba454013299360ffe18e">00040</a>         self.<a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#ac0429ddeeeb8ba454013299360ffe18e">z</a> = 0.
<a name="l00041"></a>00041     <span class="keywordflow">else</span>:
<a name="l00042"></a>00042       self.<a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#ad38947dface3e97e904845ec12b83ea3">x</a> = 0.
<a name="l00043"></a>00043       self.<a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#ad29f561c158c52ff55f9b5d23b0c1de4">y</a> = 0.
<a name="l00044"></a>00044       self.<a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#ac0429ddeeeb8ba454013299360ffe18e">z</a> = 0.
<a name="l00045"></a>00045 
<a name="l00046"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#aa4a9e5cb5ddbfa7912e18b1de3ba9205">00046</a>   <span class="keyword">def </span><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#aa4a9e5cb5ddbfa7912e18b1de3ba9205">_get_types</a>(self):
<a name="l00047"></a>00047     <span class="stringliteral">&quot;&quot;&quot;</span>
<a name="l00048"></a>00048 <span class="stringliteral">    internal API method</span>
<a name="l00049"></a>00049 <span class="stringliteral">    &quot;&quot;&quot;</span>
<a name="l00050"></a>00050     <span class="keywordflow">return</span> self.<a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#a7fd622a7267ef4aa761bb5e308e2076e">_slot_types</a>
<a name="l00051"></a>00051 
<a name="l00052"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#ae83b4aa97dad1b7fce86d40f6565e1f5">00052</a>   <span class="keyword">def </span><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#ae83b4aa97dad1b7fce86d40f6565e1f5">serialize</a>(self, buff):
<a name="l00053"></a>00053     <span class="stringliteral">&quot;&quot;&quot;</span>
<a name="l00054"></a>00054 <span class="stringliteral">    serialize message into buffer</span>
<a name="l00055"></a>00055 <span class="stringliteral">    @param buff: buffer</span>
<a name="l00056"></a>00056 <span class="stringliteral">    @type  buff: StringIO</span>
<a name="l00057"></a>00057 <span class="stringliteral">    &quot;&quot;&quot;</span>
<a name="l00058"></a>00058     <span class="keywordflow">try</span>:
<a name="l00059"></a>00059       _x = self
<a name="l00060"></a>00060       buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
<a name="l00061"></a>00061     <span class="keywordflow">except</span> struct.error, se: self._check_types(se)
<a name="l00062"></a>00062     <span class="keywordflow">except</span> TypeError, te: self._check_types(te)
<a name="l00063"></a>00063 
<a name="l00064"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#a91321a37b083244e0f300e1d276b4bba">00064</a>   <span class="keyword">def </span><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#a91321a37b083244e0f300e1d276b4bba">deserialize</a>(self, str):
<a name="l00065"></a>00065     <span class="stringliteral">&quot;&quot;&quot;</span>
<a name="l00066"></a>00066 <span class="stringliteral">    unpack serialized message in str into this message instance</span>
<a name="l00067"></a>00067 <span class="stringliteral">    @param str: byte array of serialized message</span>
<a name="l00068"></a>00068 <span class="stringliteral">    @type  str: str</span>
<a name="l00069"></a>00069 <span class="stringliteral">    &quot;&quot;&quot;</span>
<a name="l00070"></a>00070     <span class="keywordflow">try</span>:
<a name="l00071"></a>00071       end = 0
<a name="l00072"></a>00072       _x = self
<a name="l00073"></a>00073       start = end
<a name="l00074"></a>00074       end += 24
<a name="l00075"></a>00075       (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
<a name="l00076"></a>00076       <span class="keywordflow">return</span> self
<a name="l00077"></a>00077     <span class="keywordflow">except</span> struct.error, e:
<a name="l00078"></a>00078       <span class="keywordflow">raise</span> roslib.message.DeserializationError(e) <span class="comment">#most likely buffer underfill</span>
<a name="l00079"></a>00079 
<a name="l00080"></a>00080 
<a name="l00081"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#adb79adf7cb8808c5bfaf3e84433a4575">00081</a>   <span class="keyword">def </span><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#adb79adf7cb8808c5bfaf3e84433a4575">serialize_numpy</a>(self, buff, numpy):
<a name="l00082"></a>00082     <span class="stringliteral">&quot;&quot;&quot;</span>
<a name="l00083"></a>00083 <span class="stringliteral">    serialize message with numpy array types into buffer</span>
<a name="l00084"></a>00084 <span class="stringliteral">    @param buff: buffer</span>
<a name="l00085"></a>00085 <span class="stringliteral">    @type  buff: StringIO</span>
<a name="l00086"></a>00086 <span class="stringliteral">    @param numpy: numpy python module</span>
<a name="l00087"></a>00087 <span class="stringliteral">    @type  numpy module</span>
<a name="l00088"></a>00088 <span class="stringliteral">    &quot;&quot;&quot;</span>
<a name="l00089"></a>00089     <span class="keywordflow">try</span>:
<a name="l00090"></a>00090       _x = self
<a name="l00091"></a>00091       buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
<a name="l00092"></a>00092     <span class="keywordflow">except</span> struct.error, se: self._check_types(se)
<a name="l00093"></a>00093     <span class="keywordflow">except</span> TypeError, te: self._check_types(te)
<a name="l00094"></a>00094 
<a name="l00095"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#a51174ce0053439f0bace2c9dc8a68528">00095</a>   <span class="keyword">def </span><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordRequest.html#a51174ce0053439f0bace2c9dc8a68528">deserialize_numpy</a>(self, str, numpy):
<a name="l00096"></a>00096     <span class="stringliteral">&quot;&quot;&quot;</span>
<a name="l00097"></a>00097 <span class="stringliteral">    unpack serialized message in str into this message instance using numpy for array types</span>
<a name="l00098"></a>00098 <span class="stringliteral">    @param str: byte array of serialized message</span>
<a name="l00099"></a>00099 <span class="stringliteral">    @type  str: str</span>
<a name="l00100"></a>00100 <span class="stringliteral">    @param numpy: numpy python module</span>
<a name="l00101"></a>00101 <span class="stringliteral">    @type  numpy: module</span>
<a name="l00102"></a>00102 <span class="stringliteral">    &quot;&quot;&quot;</span>
<a name="l00103"></a>00103     <span class="keywordflow">try</span>:
<a name="l00104"></a>00104       end = 0
<a name="l00105"></a>00105       _x = self
<a name="l00106"></a>00106       start = end
<a name="l00107"></a>00107       end += 24
<a name="l00108"></a>00108       (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
<a name="l00109"></a>00109       <span class="keywordflow">return</span> self
<a name="l00110"></a>00110     <span class="keywordflow">except</span> struct.error, e:
<a name="l00111"></a>00111       <span class="keywordflow">raise</span> roslib.message.DeserializationError(e) <span class="comment">#most likely buffer underfill</span>
<a name="l00112"></a>00112 
<a name="l00113"></a><a class="code" href="namespacepar__kinematics_1_1srv_1_1__coord.html#a0ad1f79715644d91567aefe9b8e6abca">00113</a> _struct_I = roslib.message.struct_I
<a name="l00114"></a><a class="code" href="namespacepar__kinematics_1_1srv_1_1__coord.html#a338d26c121423626f05abb45f0e9d777">00114</a> _struct_3d = struct.Struct(<span class="stringliteral">&quot;&lt;3d&quot;</span>)
<a name="l00115"></a>00115 <span class="stringliteral">&quot;&quot;&quot;autogenerated by genmsg_py from coordResponse.msg. Do not edit.&quot;&quot;&quot;</span>
<a name="l00116"></a>00116 <span class="keyword">import</span> roslib.message
<a name="l00117"></a>00117 <span class="keyword">import</span> struct
<a name="l00118"></a>00118 
<a name="l00119"></a>00119 
<a name="l00120"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordResponse.html">00120</a> <span class="keyword">class </span><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordResponse.html">coordResponse</a>(roslib.message.Message):
<a name="l00121"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordResponse.html#a773ecae166ce6e5f745d173ee42492c4">00121</a>   _md5sum = <span class="stringliteral">&quot;351e9bdf3bd53d4e7c4b2cad44c47f80&quot;</span>
<a name="l00122"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordResponse.html#acd80e2e389bde154acd0c6c4d6633581">00122</a>   _type = <span class="stringliteral">&quot;par_kinematics/coordResponse&quot;</span>
<a name="l00123"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordResponse.html#a8e57341eac38113e9f7cda4f2803476c">00123</a>   _has_header = <span class="keyword">False</span> <span class="comment">#flag to mark the presence of a Header object</span>
<a name="l00124"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordResponse.html#a0d8b357efdc6acf63048ace0f654d32e">00124</a>   _full_text = <span class="stringliteral">&quot;&quot;&quot;float64[3] angles</span>
<a name="l00125"></a>00125 <span class="stringliteral"></span>
<a name="l00126"></a>00126 <span class="stringliteral"></span>
<a name="l00127"></a>00127 <span class="stringliteral">&quot;&quot;&quot;</span>
<a name="l00128"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordResponse.html#a859f1fd461d65907a2b9e7842664e358">00128</a>   __slots__ = [<span class="stringliteral">&#39;angles&#39;</span>]
<a name="l00129"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordResponse.html#ab0406d96e14ff9ee288e3292ea63672e">00129</a>   _slot_types = [<span class="stringliteral">&#39;float64[3]&#39;</span>]
<a name="l00130"></a>00130 
<a name="l00131"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordResponse.html#a0e63e9b3c24ee238a6f1bbe072198965">00131</a>   <span class="keyword">def </span><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordResponse.html#a0e63e9b3c24ee238a6f1bbe072198965">__init__</a>(self, *args, **kwds):
<a name="l00132"></a>00132     <span class="stringliteral">&quot;&quot;&quot;</span>
<a name="l00133"></a>00133 <span class="stringliteral">    Constructor. Any message fields that are implicitly/explicitly</span>
<a name="l00134"></a>00134 <span class="stringliteral">    set to None will be assigned a default value. The recommend</span>
<a name="l00135"></a>00135 <span class="stringliteral">    use is keyword arguments as this is more robust to future message</span>
<a name="l00136"></a>00136 <span class="stringliteral">    changes.  You cannot mix in-order arguments and keyword arguments.</span>
<a name="l00137"></a>00137 <span class="stringliteral">    </span>
<a name="l00138"></a>00138 <span class="stringliteral">    The available fields are:</span>
<a name="l00139"></a>00139 <span class="stringliteral">       angles</span>
<a name="l00140"></a>00140 <span class="stringliteral">    </span>
<a name="l00141"></a>00141 <span class="stringliteral">    @param args: complete set of field values, in .msg order</span>
<a name="l00142"></a>00142 <span class="stringliteral">    @param kwds: use keyword arguments corresponding to message field names</span>
<a name="l00143"></a>00143 <span class="stringliteral">    to set specific fields. </span>
<a name="l00144"></a>00144 <span class="stringliteral">    &quot;&quot;&quot;</span>
<a name="l00145"></a>00145     <span class="keywordflow">if</span> args <span class="keywordflow">or</span> kwds:
<a name="l00146"></a>00146       super(coordResponse, self).__init__(*args, **kwds)
<a name="l00147"></a>00147       <span class="comment">#message fields cannot be None, assign default values for those that are</span>
<a name="l00148"></a>00148       <span class="keywordflow">if</span> self.<a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordResponse.html#a6c5f08f205eea963ac4ba834a13c6e33">angles</a> <span class="keywordflow">is</span> <span class="keywordtype">None</span>:
<a name="l00149"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordResponse.html#a6c5f08f205eea963ac4ba834a13c6e33">00149</a>         self.<a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordResponse.html#a6c5f08f205eea963ac4ba834a13c6e33">angles</a> = [0.,0.,0.]
<a name="l00150"></a>00150     <span class="keywordflow">else</span>:
<a name="l00151"></a>00151       self.<a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordResponse.html#a6c5f08f205eea963ac4ba834a13c6e33">angles</a> = [0.,0.,0.]
<a name="l00152"></a>00152 
<a name="l00153"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordResponse.html#a90519522f65902b11c84d761cc4cf178">00153</a>   <span class="keyword">def </span><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordResponse.html#a90519522f65902b11c84d761cc4cf178">_get_types</a>(self):
<a name="l00154"></a>00154     <span class="stringliteral">&quot;&quot;&quot;</span>
<a name="l00155"></a>00155 <span class="stringliteral">    internal API method</span>
<a name="l00156"></a>00156 <span class="stringliteral">    &quot;&quot;&quot;</span>
<a name="l00157"></a>00157     <span class="keywordflow">return</span> self.<a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordResponse.html#ab0406d96e14ff9ee288e3292ea63672e">_slot_types</a>
<a name="l00158"></a>00158 
<a name="l00159"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordResponse.html#ac48f10cff76738294cdb02b038953512">00159</a>   <span class="keyword">def </span><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordResponse.html#ac48f10cff76738294cdb02b038953512">serialize</a>(self, buff):
<a name="l00160"></a>00160     <span class="stringliteral">&quot;&quot;&quot;</span>
<a name="l00161"></a>00161 <span class="stringliteral">    serialize message into buffer</span>
<a name="l00162"></a>00162 <span class="stringliteral">    @param buff: buffer</span>
<a name="l00163"></a>00163 <span class="stringliteral">    @type  buff: StringIO</span>
<a name="l00164"></a>00164 <span class="stringliteral">    &quot;&quot;&quot;</span>
<a name="l00165"></a>00165     <span class="keywordflow">try</span>:
<a name="l00166"></a>00166       buff.write(_struct_3d.pack(*self.<a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordResponse.html#a6c5f08f205eea963ac4ba834a13c6e33">angles</a>))
<a name="l00167"></a>00167     <span class="keywordflow">except</span> struct.error, se: self._check_types(se)
<a name="l00168"></a>00168     <span class="keywordflow">except</span> TypeError, te: self._check_types(te)
<a name="l00169"></a>00169 
<a name="l00170"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordResponse.html#ae4bf8e3f590051516a54e76e07e05f4f">00170</a>   <span class="keyword">def </span><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordResponse.html#ae4bf8e3f590051516a54e76e07e05f4f">deserialize</a>(self, str):
<a name="l00171"></a>00171     <span class="stringliteral">&quot;&quot;&quot;</span>
<a name="l00172"></a>00172 <span class="stringliteral">    unpack serialized message in str into this message instance</span>
<a name="l00173"></a>00173 <span class="stringliteral">    @param str: byte array of serialized message</span>
<a name="l00174"></a>00174 <span class="stringliteral">    @type  str: str</span>
<a name="l00175"></a>00175 <span class="stringliteral">    &quot;&quot;&quot;</span>
<a name="l00176"></a>00176     <span class="keywordflow">try</span>:
<a name="l00177"></a>00177       end = 0
<a name="l00178"></a>00178       start = end
<a name="l00179"></a>00179       end += 24
<a name="l00180"></a>00180       self.<a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordResponse.html#a6c5f08f205eea963ac4ba834a13c6e33">angles</a> = _struct_3d.unpack(str[start:end])
<a name="l00181"></a>00181       <span class="keywordflow">return</span> self
<a name="l00182"></a>00182     <span class="keywordflow">except</span> struct.error, e:
<a name="l00183"></a>00183       <span class="keywordflow">raise</span> roslib.message.DeserializationError(e) <span class="comment">#most likely buffer underfill</span>
<a name="l00184"></a>00184 
<a name="l00185"></a>00185 
<a name="l00186"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordResponse.html#a0bad4fe916025f9d7253921ea211f18b">00186</a>   <span class="keyword">def </span><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordResponse.html#a0bad4fe916025f9d7253921ea211f18b">serialize_numpy</a>(self, buff, numpy):
<a name="l00187"></a>00187     <span class="stringliteral">&quot;&quot;&quot;</span>
<a name="l00188"></a>00188 <span class="stringliteral">    serialize message with numpy array types into buffer</span>
<a name="l00189"></a>00189 <span class="stringliteral">    @param buff: buffer</span>
<a name="l00190"></a>00190 <span class="stringliteral">    @type  buff: StringIO</span>
<a name="l00191"></a>00191 <span class="stringliteral">    @param numpy: numpy python module</span>
<a name="l00192"></a>00192 <span class="stringliteral">    @type  numpy module</span>
<a name="l00193"></a>00193 <span class="stringliteral">    &quot;&quot;&quot;</span>
<a name="l00194"></a>00194     <span class="keywordflow">try</span>:
<a name="l00195"></a>00195       buff.write(self.<a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordResponse.html#a6c5f08f205eea963ac4ba834a13c6e33">angles</a>.tostring())
<a name="l00196"></a>00196     <span class="keywordflow">except</span> struct.error, se: self._check_types(se)
<a name="l00197"></a>00197     <span class="keywordflow">except</span> TypeError, te: self._check_types(te)
<a name="l00198"></a>00198 
<a name="l00199"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordResponse.html#ad9561785ac50477cff33c80706f7c460">00199</a>   <span class="keyword">def </span><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordResponse.html#ad9561785ac50477cff33c80706f7c460">deserialize_numpy</a>(self, str, numpy):
<a name="l00200"></a>00200     <span class="stringliteral">&quot;&quot;&quot;</span>
<a name="l00201"></a>00201 <span class="stringliteral">    unpack serialized message in str into this message instance using numpy for array types</span>
<a name="l00202"></a>00202 <span class="stringliteral">    @param str: byte array of serialized message</span>
<a name="l00203"></a>00203 <span class="stringliteral">    @type  str: str</span>
<a name="l00204"></a>00204 <span class="stringliteral">    @param numpy: numpy python module</span>
<a name="l00205"></a>00205 <span class="stringliteral">    @type  numpy: module</span>
<a name="l00206"></a>00206 <span class="stringliteral">    &quot;&quot;&quot;</span>
<a name="l00207"></a>00207     <span class="keywordflow">try</span>:
<a name="l00208"></a>00208       end = 0
<a name="l00209"></a>00209       start = end
<a name="l00210"></a>00210       end += 24
<a name="l00211"></a>00211       self.<a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coordResponse.html#a6c5f08f205eea963ac4ba834a13c6e33">angles</a> = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
<a name="l00212"></a>00212       <span class="keywordflow">return</span> self
<a name="l00213"></a>00213     <span class="keywordflow">except</span> struct.error, e:
<a name="l00214"></a>00214       <span class="keywordflow">raise</span> roslib.message.DeserializationError(e) <span class="comment">#most likely buffer underfill</span>
<a name="l00215"></a>00215 
<a name="l00216"></a>00216 _struct_I = roslib.message.struct_I
<a name="l00217"></a>00217 _struct_3d = struct.Struct(<span class="stringliteral">&quot;&lt;3d&quot;</span>)
<a name="l00218"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coord.html">00218</a> <span class="keyword">class </span><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coord.html">coord</a>(roslib.message.ServiceDefinition):
<a name="l00219"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coord.html#afbc726f17fe7a4b460c1537fb4cf0072">00219</a>   _type          = <span class="stringliteral">&#39;par_kinematics/coord&#39;</span>
<a name="l00220"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coord.html#ade92c68735cebe000569880b0ee829f4">00220</a>   _md5sum = <span class="stringliteral">&#39;acc400270c834b82426139cad75dc3c5&#39;</span>
<a name="l00221"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coord.html#abb090390894901805a46e6b612d3d9b6">00221</a>   _request_class  = coordRequest
<a name="l00222"></a><a class="code" href="classpar__kinematics_1_1srv_1_1__coord_1_1coord.html#a8e834be9263cdaf763182c1df3af428b">00222</a>   _response_class = coordResponse
</pre></div></div>
</div>
</td></tr></table>

<hr size="1"><div style="align: right;">
<a href="http://ros.org/wiki/par_kinematics">par_kinematics</a><br />
Author(s): Wouter van Teijlingen</br />
<small>autogenerated on Mon Jun 13 2011 17:06:55</small>
</div>
</body>
</html>
